<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditKontoTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditKontoLabel_id}" for="id" />
                    <h:inputText id="id" value="#{kontoController.selected.id}" title="#{bundle.EditKontoTitle_id}" required="true" requiredMessage="#{bundle.EditKontoRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.EditKontoLabel_login}" for="login" />
                    <h:inputText id="login" value="#{kontoController.selected.login}" title="#{bundle.EditKontoTitle_login}" required="true" requiredMessage="#{bundle.EditKontoRequiredMessage_login}"/>
                    <h:outputLabel value="#{bundle.EditKontoLabel_haslo}" for="haslo" />
                    <h:inputText id="haslo" value="#{kontoController.selected.haslo}" title="#{bundle.EditKontoTitle_haslo}" required="true" requiredMessage="#{bundle.EditKontoRequiredMessage_haslo}"/>
                    <h:outputLabel value="#{bundle.EditKontoLabel_typ}" for="typ" />
                    <h:inputText id="typ" value="#{kontoController.selected.typ}" title="#{bundle.EditKontoTitle_typ}" required="true" requiredMessage="#{bundle.EditKontoRequiredMessage_typ}"/>
                    <h:outputLabel value="#{bundle.EditKontoLabel_email}" for="email" />
                    <h:inputText id="email" value="#{kontoController.selected.email}" title="#{bundle.EditKontoTitle_email}" required="true" requiredMessage="#{bundle.EditKontoRequiredMessage_email}"/>
                    <h:outputLabel value="#{bundle.EditKontoLabel_imie}" for="imie" />
                    <h:inputText id="imie" value="#{kontoController.selected.imie}" title="#{bundle.EditKontoTitle_imie}" />
                    <h:outputLabel value="#{bundle.EditKontoLabel_nazwisko}" for="nazwisko" />
                    <h:inputText id="nazwisko" value="#{kontoController.selected.nazwisko}" title="#{bundle.EditKontoTitle_nazwisko}" />
                    <h:outputLabel value="#{bundle.EditKontoLabel_miasto}" for="miasto" />
                    <h:inputText id="miasto" value="#{kontoController.selected.miasto}" title="#{bundle.EditKontoTitle_miasto}" />
                    <h:outputLabel value="#{bundle.EditKontoLabel_adres}" for="adres" />
                    <h:inputText id="adres" value="#{kontoController.selected.adres}" title="#{bundle.EditKontoTitle_adres}" />
                    <h:outputLabel value="#{bundle.EditKontoLabel_kodPocztowy}" for="kodPocztowy" />
                    <h:inputText id="kodPocztowy" value="#{kontoController.selected.kodPocztowy}" title="#{bundle.EditKontoTitle_kodPocztowy}" />
                    <h:outputLabel value="#{bundle.EditKontoLabel_plec}" for="plec" />
                    <h:inputText id="plec" value="#{kontoController.selected.plec}" title="#{bundle.EditKontoTitle_plec}" />
                    <h:outputLabel value="#{bundle.EditKontoLabel_datazalozenia}" for="datazalozenia" />
                    <h:inputText id="datazalozenia" value="#{kontoController.selected.datazalozenia}" title="#{bundle.EditKontoTitle_datazalozenia}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                </h:panelGrid>
                <h:commandLink action="#{kontoController.update}" value="#{bundle.EditKontoSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditKontoViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{kontoController.prepareList}" value="#{bundle.EditKontoShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditKontoIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
